﻿using Microsoft.Xna.Framework.Input;
using RaptorEngine.Managers;
using RaptorEngine;

namespace OilRigSumoWrestlers.Commands
{
    public class MoveCommand : InputCommand
    {
        public Keys? Key { get; set; }
        public Buttons? Button { get; set; }
        public LogicalPlayerIndex LogicalPlayer { get; set; }

        protected override bool OnDetect()
        {
            return
                (Key.HasValue && GameEngine.Instance.Input.IsDown(Key.Value))
                || (Button.HasValue && GameEngine.Instance.Input.IsDown(Button.Value, LogicalPlayer));
        }
    }
}
